A. Field of the Invention
The present invention relates to the field of data communications and, more particularly to the field of data communications using modems.
B. Background of the Invention
Serial port modems in personal computers permit users to connect to a growing variety of network services on a telephone line. Modems have evolved to the extent that users may communicate at speeds that are too high for some phone lines.
Some modems adapt to changing line conditions by adjusting the connect speed to ensure reliable data transport. The connect speed at which a modem is communicating is therefore, not precisely what the user may expect. In addition, the speed of data transmission may be different from the speed of data reception. Some users may find it useful to know the exact connect speeds in both directions. Diagnostic tools may also be developed that provide useful information about a modem""s performance. The usefulness of the tools depends however, on the ability to provide it with information about the performance of a modem while the modem is communicating.
One problem with obtaining diagnostic information (e.g. the true connect speed) about the performance of the modem while it is communicating is that modems do not typically execute commands to give status information while communicating. Modems are typically online communicating data or offline executing commands. Modems can be put into an online command mode.
In one diagnostic tool, a user at a computer station connects to a bulletin board service (BBS) that provides a way of testing the telephone line to determine if it is capable of communicating at speeds of 56 kbaud. The tool performs modem commands to make the determination by sending xe2x80x9c+++xe2x80x9d to the modem to interrupt the data mode online state and to take the modem to an online command mode. The xe2x80x9c+++xe2x80x9d string is typically required to be sent at the same cadence and speed of human typing. In the online command mode, the modem will receive and execute commands. An xe2x80x9cAT16xe2x80x9d command is sent to the modem to cause it to transmit an information screen. The tool parses the screen data for the desired information. When the tool is finished, it sends an xe2x80x9cATOxe2x80x9d command to the modem to cause it to go back to data mode on-line. As the example illustrates, it was necessary for the modem to be put in a command mode while on-line to retrieve status information. During the command mode, the modem was not communicating data.
In addition, the xe2x80x9c+++xe2x80x9d command takes approximately xc2xd second to complete because it has to be executed at the speed and cadence of human typing. If the results of obtaining information were to be displayed on the screen, another second of time would elapse. The 1xc2xd seconds of time to obtain the information makes it difficult to provide the results on the screen in real-time and stops all useful data transfer.
It would be desirable to retrieve status information or to issue modem commands without having to cause the modem to go into a command mode that interrupts data communication.
It would further desirable to be able to obtain status information about a modem for display on a computer screen in real-time.
In view of the above, a system is provided for communicating with a serial communications device. The system includes a serial device interface for communicating with an application. The serial device interface includes a plurality of virtual ports. At least one of the virtual ports is configurable as a communications virtual port. At least one of the virtual ports is configurable, concurrently with the at least one communications virtual port, as a status virtual port. A serial line interface is connected to a communications medium. A serial communications processor is included for managing serial data streams between the serial line interface and the communications virtual ports. The serial communications processor includes a commands processor for executing commands received at the at least one status virtual port.
In a further aspect of the present invention, the serial device interface includes a command multiplexer for embedding commands in the serial data stream. The serial communications processor separates the embedded commands from the serial data stream. The serial communications processor is multiplexes a results string with an input data stream in response to the embedded commands.
In another aspect of the present invention, a port router is included to map device names to the virtual ports. The virtual ports include a port driver for sending commands to the serial communications processor.
A method is also provided for communicating with a serial communications device connected to a serial interface line. A communications connection is initiated by opening a first virtual port in the serial communications device and connecting the first virtual port to a destination station over the serial interface line. The first virtual port is used for communicating a data stream between the serial communications device and the destination station. A second virtual port is opened in the serial communications device. Commands are sent to the second virtual port and processed, such that the commands are processed without an interruption in the communication of the data stream at the first virtual port.
These and many other advantages and features of the invention will become more apparent from the following detailed description of presently preferred embodiments of the invention.